package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SetmealDishMapper {

    /**
     * 根据菜品id查询对于的套餐id
     * @param dishIds
     * @return
     */
    List<Long> getSetmealDishByDishIds(List<Long> dishIds);

    /**
     * 批量添加套餐菜品表
     * @param setmealDishes
     */

    void insert(List<SetmealDish> setmealDishes);

    @Select("select * from setmeal_dish where setmeal_id = #{id} ")
    List<SetmealDish> findBySetmealId(Long id);

    @Delete("delete from setmeal_dish where setmeal_id = #{id} ")
    void deleteBySetmealId(Long id);

    List<Long> getSetmealId(Long id);
}
